from api.ihrm_api import IhrmApi
from common.token_util import TokenUtil
class DepartmentUtil:
    @classmethod
    def get_dep_id(cls):
        token = TokenUtil.get_token()
        add_dep_body = {"name": "服务部门", "code": 3}
        add_dep_resp = IhrmApi.add_dapartment_api(token,add_dep_body)
        dep_id = add_dep_resp.json().get('data').get('id')
        return dep_id

if __name__ == '__main__':
    print(DepartmentUtil.get_dep_id())